package com.zhq.apputil.widget.bean;

/**
 * Created by Administrator on 2017/12/4.
 *
 */
public class BadgeBean {
    private boolean  isShowRedDrawable;//是否显示底部导航栏红点
    private String redDotColor;//消息红点颜色值
    private int redDotRadius=5;//红点的大小
    private int redDotTotPosition;//设置红点底部的位置
    private int badgeCount;//消息的数量
    private int gravity;//消息显示的位置
    public void setShowRedDrawable(boolean showRedDrawable) {
        isShowRedDrawable = showRedDrawable;
    }

    public void setRedDotColor(String redDotColor) {
        this.redDotColor = redDotColor;
    }

    public void setRedDotRadius(int redDotRadius) {
        this.redDotRadius = redDotRadius;
    }

    public void setRedDotTotPosition(int redDotTotPosition) {
        this.redDotTotPosition = redDotTotPosition;
    }
    public int getGravity() {
        return gravity;
    }

    public void setBadgeCount(int  badgeCount) {
        this.badgeCount = badgeCount;
    }
    public int getRedDotTotPosition() {
        return redDotTotPosition;
    }

    public String getRedDotColor() {
        return redDotColor;
    }
    public int getBadgeCount() {
        return badgeCount;
    }

    public int getRedDotRadius() {
        return redDotRadius;
    }

    public boolean isShowRedDrawable() {
        return isShowRedDrawable;
    }

    public BadgeBean(){

    }
    public BadgeBean(Builder builder){
        this.isShowRedDrawable=builder.isShowRedDrawable;
        this.redDotColor= builder.redDotColor;
        this. redDotRadius=builder.redDotRadius;
        this. redDotTotPosition=builder.redDotTotPosition;
        this.badgeCount=builder.badgeCount;
        this.gravity=builder.gravity;
    }
    public static class Builder{
        private boolean  isShowRedDrawable;//是否显示底部导航栏红点
        private String redDotColor;//消息红点颜色值
        private int redDotRadius=5;//红点的大小
        private int redDotTotPosition;//设置红点的位置
        private int badgeCount;//消息的数量
        private int gravity;//消息显示的位置
        public Builder(){

        }
        public Builder setBadgeShow(boolean  isShowRedDot){
            this.isShowRedDrawable=isShowRedDot;
            return  this;
        }

        public Builder setBadgeColor(String redDotColor){
            this.redDotColor=redDotColor;
            return this;
        }

        public Builder setBadgeRadius(int redDotRadius){
            this.redDotRadius=redDotRadius;
            return this;
        }


        public Builder setBadgePosition(int redDotTotPosition){
            this.redDotTotPosition=redDotTotPosition;
            return this;
        }

        public Builder setBadgeCount(int badgeCount){
            this.badgeCount=badgeCount;
            return this;
        }

        public Builder setBadgeGravity(int gravity){
            this.gravity=gravity;
            return this;
        }

        public BadgeBean build(){
            return  new BadgeBean(this);
        }

    }

    @Override
    public String toString() {
        return "isShow:"+isShowRedDrawable+"->-> redDotRadius:"+redDotRadius+"->->redDotTotPosition:"+redDotTotPosition+"->->redDotColor:"+
                redDotColor;
    }
}
